/**
 * Created by Qingger Corp.
 * User: Administrator
 * Date: 2019-07-05
 * Time: 16:31
 */
import request from '@/utils/request'

//获取角色列表
export function getRoleList(data) {
  return request({
    url:'/roles',
    method:'post',
    params:data
  })
}

//编辑新增角色
export function RoleInfo(data) {
  return request({
    url:'/role/create',
    method:'post',
    data:data
  })
}


//员工列表
export function getStaffsList(data) {
  return request({
    url:'/staffs',
    method:'post',
    params:data
  })
}

//员工编辑
export function postStaffsEdit(data) {
  return request({
    url:'/staffs/create',
    method:'post',
    data:data
  })
}


//员工离职
export function delSellerItem(data) {
  return request({
    url:'/staffs/quit',
    method:'post',
    data:data
  })
}

//发送验证码
export function sendAddSellerSMSCode(data) {
  return request({
    url:'/shop/sendAddSellerSMSCode ',
    method:'post',
    data:data
  })
}


//部门列表
export function getDeptList(data) {
  return request({
    url:'/dept',
    method:'post',
    data:data,
  })
}

//部门 新增&编辑
export function saveDept(data) {
  return request({
    url:'/dept/create',
    method:'post',
    data:data,
  })
}

//部门 删除
export function delDept(data) {
  return request({
    url:'/dept/delete',
    method:'post',
    data:data,
  })
}


//获取权限
export function getPermissions() {
  return request({
    url:'/permissions',
    method: 'post',
  })
}

//删除角色
export function delRoles(data) {
  return request({
    url:'/role/delete',
    method: 'post',
    data
  })
}

//获取文档分类列表
export function articleClassList(data) {
  return request({
    url:'/article/classList',
    method: 'post',
    data
  })
}

//获取文档分类列表
export function articleEditClass(data) {
  return request({
    url:'/article/editClass',
    method: 'post',
    data
  })
}

//删除文档分类
export function articleDelClass(data) {
  return request({
    url:'/article/delClass',
    method: 'post',
    data
  })
}

//获取文档列表
export function articleList(data) {
  return request({
    url:'/article/articleList',
    method: 'post',
    data
  })
}

//文档添加&编辑
export function editArticle(data) {
  return request({
    url:'/article/editArticle',
    method: 'post',
    data
  })
}

//文档添加&编辑
export function delArticle(data) {
  return request({
    url:'/article/delArticle',
    method: 'post',
    data
  })
}


//员工排序
export function changeUserInfo(data) {
  return request({
    url:'/staffs/changeUser',
    method: 'post',
    data
  })
}

//获取员工类型树
export function listByDepartMange(data) {
    return request({
        url:'/staffs/listByDepartMange',
        method: 'post',
        data
    })
}
